package com.example.teamtribe.database;

import android.os.Parcel;
import android.os.Parcelable;

import org.litepal.crud.DataSupport;

public class Bill extends DataSupport implements Parcelable {

    int id;
    String date;
    String name;
    String use;
    int userId;
    double out;
    double in;
    int teamId;

    public Bill() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUse() {
        return use;
    }

    public void setUse(String use) {
        this.use = use;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public double getOut() {
        return out;
    }

    public void setOut(double out) {
        this.out = out;
    }

    public double getIn() {
        return in;
    }

    public void setIn(double in) {
        this.in = in;
    }

    public int getTeamId() {
        return teamId;
    }

    public void setTeamId(int teamId) {
        this.teamId = teamId;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeString(this.date);
        dest.writeString(this.name);
        dest.writeString(this.use);
        dest.writeInt(this.userId);
        dest.writeDouble(this.out);
        dest.writeDouble(this.in);
        dest.writeInt(this.teamId);
    }

    protected Bill(Parcel in) {
        this.id = in.readInt();
        this.date = in.readString();
        this.name = in.readString();
        this.use = in.readString();
        this.userId = in.readInt();
        this.out = in.readDouble();
        this.in = in.readDouble();
        this.teamId = in.readInt();
    }

    public static final Parcelable.Creator<Bill> CREATOR = new Parcelable.Creator<Bill>() {
        @Override
        public Bill createFromParcel(Parcel source) {
            return new Bill(source);
        }

        @Override
        public Bill[] newArray(int size) {
            return new Bill[size];
        }
    };
}
